package com.liruo.learn.spring.mvc.config;

import io.lettuce.core.ClientOptions;
import org.springframework.boot.autoconfigure.data.redis.LettuceClientConfigurationBuilderCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author:liruo
 * @Date:2023-08-12-16:45:56
 * @Desc
 */
@Configuration
public class RedisConfig {
  @Bean
  public LettuceClientConfigurationBuilderCustomizer g1(){
    return config->config.clientOptions(
        ClientOptions.builder()
            .autoReconnect(false)
            .build()
    );
  }
}
